package com.daimakuai.controller;

import com.daimakuai.entity.UserInfo;
import com.daimakuai.service.UserInfoService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

/**
 * @author happyonion.yangtao
 * @Title: MongodbController
 * @ProjectName admin-behind
 * @PackageName com.daimakuai.controller
 * @Description TODO
 * @date Create at 2018/12/20 20:26
 */
@RequestMapping("/mongodb")
public class MongodbController {

    @Resource
    private UserInfoService userInfoService;


    @RequestMapping(value = "/test",method = RequestMethod.GET)
    public String test(){
        UserInfo userInfo = new UserInfo();
        userInfo.setNickname("nick");
        userInfo.setUsername("Nike2");
        userInfo.setSex("female");
        userInfo.setAge("27");
        userInfoService.add(userInfo);
        return "test";
    }
}
